export function Times(time) {
  if (time) {
    var times = new Date(time);
    var year = times.getFullYear();
    var month = times.getMonth() + 1;
    var day = times.getDate();
    var hours = times.getHours();
    var mintutes = times.getMinutes();
    if (month < 10) {
      month = "0" + month;
    }
    if (day < 10) {
      day = "0" + day;
    }
    if (hours < 10) {
      hours = "0" + hours;
    }
    if (mintutes < 10) {
      mintutes = "0" + mintutes;
    }
    return year + "-" + month + "-" + day + " " + hours + ":" + mintutes;
  }
}
